<template>
  <div>
    <div class="top-title">电机电流监测</div>
    <div class="center">
      <div class="center-item">
        <div class="title">电流</div>
        <div>
          <span class="value">19.8</span>
          <span class="cam">A</span>
        </div>
      </div>
    </div>
    <MouldBox
      :chartOption="chartOption"
      :datas="lists"
      :text="text"
      chartTitle="近24小时电机电流分析"
      height="9.8125rem"
    ></MouldBox>
  </div>
</template>

<script>
import MouldBox from '../common/MouldBox.vue';
export default {
  props: {
    title: {
      typeof: String,
      default: ''
    }
  },
  data() {
    return {
      chartOption: {
        color: ['#00FDFF'],
        area: false,
        unit: 'A'
      },
      lists: [
        { x: '12-01', y: 38.2, s: '一级电流' },
        { x: '12-06', y: 30.2, s: '一级电流' },
        { x: '12-11', y: 36.0, s: '一级电流' },
        { x: '12-16', y: 37.3, s: '一级电流' },
        { x: '12-21', y: 37.9, s: '一级电流' },
        { x: '12-26', y: 34.2, s: '一级电流' },
        { x: '12-31', y: 36.7, s: '一级电流' }
      ],
      curTab: 0,
      text: ['一级电流']
    };
  },
  components: {
    MouldBox
  },

  computed: {
  },

  methods: {
  }
};
</script>
<style scoped lang="scss">
.top-title{
  font-size: 1rem;
  color: #F8F8F8;
  margin: 1.25rem 0 .9375rem;
}
.center-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 3.4375rem;
  border-radius: 0.25rem;
  background-color: #273443;
  padding: 0.625rem;
  box-sizing: border-box;
  margin-bottom: .9375rem;
  .title {
    color: #d8d8d8;
    font-size: 0.875rem;
  }
  .value {
    font-size: 0.875rem;
    color: #00FDFF;
    margin-right: 0.3125rem;
  }
  .cam {
    font-size: 0.75rem;
    color: #8d8d8d;
  }
  .before-value{
    color: #00FDFF;
  }
  .center-value{
    color: #34C8FF;
  }
  .after-value{
    color: #FFD101;
  }
}
</style>
